//
// Created by 吴喆 on 2020/3/1.
//

#include "Manager.h"
#include "util/Console.h"

int main(int argc, char** argv)
{
//    std::cout.setf(std::ios::ios_base::boolalpha);
//
    //Create manager object and call sequential functions
    Manager manager = *Manager::getInstance();
    try {
        manager.init();
    } catch (std::exception &e) {
        return -1;
    }

    //Enter main loop
    while (manager.state != programState::Closing)
    {
        //Call frame functions chronologically
        manager.early();
        manager.input();
        manager.logic();
        manager.render();
        manager.late();
    }

    //Done
//    manager.quit();
    return 0;
}